package com.atguigu.day14.recusion.r2;

import org.junit.Test;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/16 16:44
 * @注释
 */
public class Monkey {
    int num;
    @Test
    public void test(){
        int num = getNum(1);
        System.out.println("num = " + num);
    }

    private int getNum(int num) {
        if (num == 10){
            return 1;
        }
        return (getNum(num + 1) + 1) * 2;
    }
}
